<template>
  <h4>组件</h4>
  <Child name="zhangsan" @abc="fn" />
</template>

<script>
import Child from "./07-child.vue";

export default {
  setup() {
    const fn = () => {
      console.log("fn");
    };
    return {
      fn,
    };
  },
  // 注册组件不能写到setup里面
  // 使用components选项
  components: {
    Child,
  },
};
</script>
